<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:90:"D:\phpStudy\PHPTutorial\WWW\dk.eatchickengame.com/application/index\view\index\center.html";i:1532422276;}*/ ?>
<!DOCTYPE html>
<html lang="en">
<head>
    <title></title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <link rel="stylesheet" type="text/css" href="__FRONT__/dist/lib/weui.min.css">
    <link rel="stylesheet" type="text/css" href="__FRONT__/dist/css/jquery-weui.min.css">
    <link rel="stylesheet" type="text/css" href="__FRONT__/dist/demos/css/demos.css">
    <script src="__FRONT__/js/jquery-1.11.1.min.js"></script>
    <script type="text/javascript" src="__FRONT__/js/common.js"></script>
    <script type="text/javascript" src="__FRONT__/js/mui.min.js"></script>
    <link href="__FRONT__/css/bootstrap.min.css" rel="stylesheet">
    <link href="__FRONT__/css/common.min.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="__FRONT__/css/index.css">
    <link rel="stylesheet" type="text/css" href="__FRONT__/css/center.css">
    <link rel="stylesheet" href="__FRONT__/css/aui.css">
    <link rel="stylesheet" href="__FRONT__/css/intial.css">
    <script type="text/javascript" src="__FRONT__/js/hammer.min.js" ></script>
    <script type="text/javascript" src="__FRONT__/js/lrz.all.bundle.js" ></script>
    <script type="text/javascript" src="__FRONT__/js/iscroll-zoom-min.js" ></script>
    <script type="text/javascript" src="__FRONT__/js/PhotoClip.js" ></script>
</head>
<style>
    .main {
        position: relative;
    }
    img {
        width: 100%;
    }
    .top-word{
        position: absolute;
        top: 25%;
        width: 100%;
        text-align: center;
    }

    /*截图上传页面*/
    .clipbg{
        position: fixed;
        background: black;
        top: 0;
        z-index: 999;
        width: 100%;
        height: 100%;
        left: 0;
    }
    .loading{
        position: absolute;
        top: 40%;
        width: 38%;
        left: 31%;
        height: 1.6rem;
        line-height: 1.6rem;
        z-index: 99999;
        text-align: center;
        color: #ffffff;
        border-radius:0.2rem ;
        background: #9f9f9f;
    }
    .clipbg #clipArea{
        width: 100%;
        height: 80%;
        margin: auto;

    }
    .clipbg .footer{
        width: 90%;
        position: fixed;
        left: 5%;
        bottom: 0px;
        text-align: center;
    }
    .clipbg dl{
        background: #ffffff;
        border-radius: 0.4rem;
        overflow: hidden;
        margin-bottom: 0.6rem;
    }
    .clipbg dd{
        position: relative;
        height: 2.25rem;
        line-height: 2.25rem;
        border-bottom:1px solid #999999 ;
    }
    .clipbg .back{
        height: 2.25rem;
        line-height:2.25rem;
        border-radius: 0.4rem;
        margin-bottom: 0.4rem;
        background: #ffffff;
    }
    .clipbg dd input{
        position: absolute;
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
        z-index: 11;
        filter:alpha(opacity=0);
        -moz-opacity:0;
        -khtml-opacity: 0;
        opacity: 0;
    }
    .check_team{
        width: 100%;
        position: absolute;
        bottom: 37%;
        text-align: center;
    }
    .check_team button{
        background: #38a4ff;
        border: 1px solid #38a4ff;
    }
</style>
<body>

<!--个人中心头部区域-->
<div class="main" style="padding-bottom: 66px">
        <img src="__FRONT__/img/center-top.jpg">
            <div class="top-face btn-head">
                <img id="img-head" src="<?php echo !empty($userinfo['portrait'])?$userinfo['portrait']:'__FRONT__/img/head.jpg'; ?>" alt="" style="background: black;border-radius: 50%">
            </div>
            <div class="top-word">
                <div class="top-id"><?php echo $userinfo['mobile']; ?>&nbsp&nbspID:<?php echo $userinfo['id']; ?>
                    <span style="font-size: 16px" class="mui-icon mui-icon-compose center_edit" onclick="center()"></span>
                </div>
                <div class="top-ratetitle">昨日利率</div>
                <div class="top-rate"><?php echo round($config['notsign_money']/($config['signed_money']+$config['notsign_money'])*100,2); ?>%</div>
            </div>
            <div class="check_team">
                <button type="button" class="mui-btn mui-btn-royal check_btn" onclick="jump()">查看</button>
            </div>
            <!--<div><?php echo !empty($team['level1'])?$team['level1']['money']:0.00; ?></div>-->
            <!--图片裁剪-->
            <div class="clipbg displaynone">
                <div id="clipArea"></div>
                <!--<div class="loading displaynone">正在载入图片...</div>-->
                <div class="footer">
                    <dl>
                        <dd style="background: #fe1041; color: #ffffff;border: none;">打开相册<input type="file" id="file" accept="image/*" ></dd>
                        <dd id="clipBtn">完成裁剪</dd>
                    </dl>
                    <div class="back">取消</div>
                </div>
            </div>
<!--    <span class="first">20.00</span>
    <span class="second">30</span>
    <span class="third">40</span>-->
    <!--个人中心中部区域-->
    <!--<div class="weui-flex middle" style="border: 1px solid green;">-->
            <!--<ul class="middle-ul">-->
                <!--<li class="middle-img"><img src="__FRONT__/img/threep.jpg" alt=""></li>-->
                <!--<li class="middle-word">我的团队</li>-->
            <!--</ul>-->
    <!--</div>-->
    <!--<div class="chart" style="border: 1px solid blue;">-->
        <!--<div class="chart-img">-->
            <!--<img src="__FRONT__/img/chart.jpg" alt="">-->
        <!--</div>-->
<!--&lt;!&ndash;        <div class="weui-flex chart-word">-->
            <!--<div class="weui-flex__item"><span>20</span></div>-->
            <!--<div class="weui-flex__item"><span>30</span></div>-->
            <!--<div class="weui-flex__item"><span>40</span></div>-->
        <!--</div>&ndash;&gt;-->

    <!--</div>-->
</div>
<div class="msg-box"></div>
<div class="weui-tabbar">
        <a href="<?php echo url('Index/index'); ?>" class="weui-tabbar__item">
            <div class="weui-tabbar__icon">
                <img src="__FRONT__/img/home2.png" alt="">
            </div>
            <p class="weui-tabbar__label">参与挑战</p>
        </a>

        <a href="<?php echo url('Index/rili'); ?>" class="weui-tabbar__item">
            <div class="weui-tabbar__icon">
                <img src="__FRONT__/img/rilinight.png" alt="">
            </div>
            <p class="weui-tabbar__label">日历</p>
        </a>

        <a href="javascript:;" class="weui-tabbar__item">
            <div class="weui-tabbar__icon">
                <img class="black_ren" src="__FRONT__/img/ren2.png" alt="">
            </div>
            <p class="weui-tabbar__label change_color" style="color: #4ad1ff">个人中心</p>
        </a>
        <a href="<?php echo url('Index/read'); ?>" class="weui-tabbar__item">
            <div class="weui-tabbar__icon">
                <img src="__FRONT__/img/eye.png" alt="">
            </div>
            <p class="weui-tabbar__label">参与必读</p>
        </a>
    </div>

<script>
    function center() {
        location.href = '<?php echo url("setting/personal"); ?>'
    }

    function jump(){
        location.href = '<?php echo url("index/myteam"); ?>';
    }

    $(".btn-head").click(function(){
        $(".clipbg").fadeIn()
    });

    var clipArea = new  PhotoClip("#clipArea", {
        size: [300, 300],//裁剪框大小
        outputSize:[0,0],//打开图片大小，[0,0]表示原图大小
        file: "#file",
        ok: "#clipBtn",
        loadStart: function() { //图片开始加载的回调函数。this 指向当前 PhotoClip 的实例对象，并将正在加载的 file 对象作为参数传入。（如果是使用非 file 的方式加载图片，则该参数为图片的 url）
            $(".loading").removeClass("displaynone");
        },
/*        loadComplete: function() ,*/
        done: function(dataURL) { //裁剪完成的回调函数。this 指向当前 PhotoClip 的实例对象，会将裁剪出的图像数据DataURL作为参数传入。
            console.log(dataURL);
            //dataURL裁剪后图片地址base64格式提交给后台处理
            $.ajax({
                type: "POST",
                url: '<?php echo url("index/center"); ?>',
                dataType: 'json',
                data: {img: dataURL},
                success: function(res) {
                    if(res.code==0){
                        showmsg(res.msg,0);
                       $("#img-head").attr("src",dataURL);
                    }
                }
            });
            $(".clipbg").fadeOut();
        }
    });

    $(".back").click(function(){
        $(".clipbg").fadeOut()
    })

    /*切换主题*/
    if(localStorage.getItem('status')){
        if(localStorage.getItem('status')==1){
            night();
        }else{
            day();
        }
    }else{
        localStorage.setItem('status',2);
        day();
    }
    $(".switchs").click(function () {
        if (localStorage.getItem('status') == 1){
            localStorage.setItem('status',2);
            day();
        } else {
            localStorage.setItem('status',1);
            night();
        }
    });
    function night(){
        $("#header").css("background-image", "url(__BLACK__/black_bg.png)");
        $(".rightIcon").css("background-color", "#697dff");
        $(".center h3").css("color", "#697DFF");
        $(".real").css("color", "#505fbe");
        $(".black_star").attr("src", "__BLACK__/black_star.jpg");
        $(".black_yl").attr("src", "__BLACK__/black_yl.png");
        $(".firstTime").css("background-color", "#697dff");
        $(".secondTime").css("background-color", "#91a0ff");
        $(".black_ren").attr('src','__FRONT__/img/renye.png');
        $('.change_color').css('color','#697DFF');
        $('.change_bg').css('background-color','#697DFF');

    }
    function day(){
        $("#header").css("background-image", "url(__FRONT__/img/bg.png)");
        $(".rightIcon").css("background-color", "#00beff");
        $(".center h3").css("color", "#4ad1ff");
        $(".real").css("color", "#0990be");
        $(".black_star").attr("src", "__FRONT__/img/star.png");
        $(".black_yl").attr("src", "__FRONT__/img/yl.png");
        $(".firstTime").css("background-color", "#00a3da");
        $(".secondTime").css("background-color", "#4ad1ff");
        $(".black_ren").attr('src','__FRONT__/img/ren2.png');
        $('.change_color').css('color','#4ad1ff');
        $('.change_bg').css('background-color','#4ad1ff');
    }
    /*切换主题*/
</script>

<!---->


</body>
</html>